Secure program execution using instruction buffer interdependencies

ABSTRACT

A CPU is provided with an ability to modify its operation in accordance with an encryption key. When a program is compiled, the program is modified in order that execution may be performed with the CPU changes with respect to pipelined instruction routing. Logic on the CPU is able to route a subset of the register bits, and selects destination logic gates in the microprocessor in a manner consistent with a programmable instruction decoder. This in turn establishes an instruction buffer interdependency.

CROSS-REFERENCE TO RELATED APPLICATIONS

U.S. patent application Ser. No. 09/377,343, entitled Microprocessor inWhich Logic Changes During Execution, U.S. patent application Ser. No.09/377,298, entitled Execution of Instructions Using Op Code LengthsLonger Than Standard Op Code Lengths to Encode Data, U.S. patentapplication Ser. No. 09/376,654, entitled Secure Program ExecutionDepending on Predictable Error Correction, U.S. patent application Ser.No. 09/377,344, entitled Logic Block Used to Check Instruction BufferConfiguration, U.S. patent application Ser. No. 09/377,299, entitledMicroprocessor Instruction Result Obfuscation, and U.S. patentapplication Ser. No. 09/377,297, entitled Secure Execution of ProgramInstructions Provided by Network Interactions with Processor, allinvented by Alan C. Folmsbee and commonly assigned, share common subjectmatter. These applications are incorporated by reference herein in theirentirety.

FIELD OF THE INVENTION

This invention relates to a system for providing computer programinstructions in an encrypted manner, wherein execution of the encryptedprogram is performed by digital logic hardware. More specifically, theinvention relates to using the instruction buffers of a processor tocontrol the execution of encrypted instructions.

BACKGROUND OF THE INVENTION

Microprocessors characteristically perform a series of instructionbuffer operations during program execution, which follow a series ofsteps. While each step changes the information stored in buffers in themicroprocessor, there is generally a discernable pattern which isestablished by the steps, thus enabling undesired surreptitiousanalysis.

It is possible to provide more elaborate protective systems for encodingthe software, by use of proprietary hardware components for example, oreven by requiring the end user to comply with registration requirementsin order to enable software operation. In that respect, the encryptionscheme for the program ensures that the program is executable inunencrypted form, at least with respect to the instruction sets providedto the CPU. Unfortunately, the instructions provided to the CPU are in aform that is understandable by the CPU prior to CPU execution. Thus, itis easy for an unauthorized user to determine what is necessary tooperate the programs successfully.

It is often desired to provide software and updates of software to endusers in such a manner that the software is transferred through publicchannels, such as the Internet. To provide such software in restrictedform, it is desired to provide security to the distributor of thesoftware so that the software is not subject to unauthorized use. Inparticular, if software is shipped via public or private channels, it isdesired that the end user of the software can only use the software onthe end user's specified computer, and that the software not bewillingly or unwillingly shared by the end user. By computer, it isintended that this includes personal computers, smart cards, workstations, dedicated CPUs embedded in hardware appliances, and any otherdevice in which integrated circuit (IC) microprocessors may be used.

In some programs, the cost of the programs to the end user is such thatit becomes economical for third parties to determine what is necessaryto circumvent restrictions on use by unauthorized persons. Therefore, itis desired to make the unauthorized duplication or use of a programuneconomical. In order to do that, it is desired to provide anencryption scheme which prevents unauthorized persons from “attacking”the encryption of the software through analysis of the input and outputof user commands and instruction sets from the software. It is furtherdesired to provide a software encryption technique in which there are noexternal indicia of a decryption technique which can be used to analyzethe encryption of the software. It is further desired that software beencrypted in such a manner that it is unnecessary to decrypt thesoftware in order to accomplish execution of the software.

SUMMARY OF THE INVENTION

According to of the invention, a microprocessor processes computerprograms which are selectively operable on selected ones of individualprocessors. The microprocessor according the present invention includesan instruction buffer with a predetermined plurality of bit locations,and further includes reconfigurable logic circuitry for processinginstructions from the instruction buffer. Additionally themicroprocessor includes a programmable instruction decoder whichinterprets instructions represented by bits stored on the instructionbuffer, and the logic circuitry routes the register bits to subsequentbit locations within the instruction buffer. The subsequent bitlocations must conform to a predetermined interdependency criteriacorresponding to the predetermined format subsequent to execution of atleast one instruction by the logic circuitry, and the logic circuitryprovides a verification of the interdependency criteria.

More particularly according to the invention, in order to executeprogram instructions, buffer interdependencies must match thosepredicted by the compiler. If one were to reverse engineer the program,the interdependencies may not match, and this provides a means ofdetecting unauthorized use.

According to a further aspect of the invention, a CPU is provided withan ability to modify its operation in accordance with an encryption key.When a program is compiled, the program is modified in order thatexecution may be performed with the CPU changes with respect topipelined instruction routing. Logic on the CPU is able to route asubset of the register bits, and selects destination logic gates in themicroprocessor. This in turn establishes an instruction bufferinterdependency.

According to one aspect of the invention, a microprocessor containslogic able to route a subset of bits from selected bit locations in thebuffer to destination logic circuits in the microprocessor. Thedestination logic circuits then provide verification of whether theregister bits meet a predetermined criteria.

An instruction buffer on a keyed microprocessor contains logic which isable to route a subset of the instruction bits on the microprocessor.This selects destination logic gates in the microprocessor whicheventually reach a programmable instruction decoder. If theinterdependencies fail to match a predetermined acceptable pattern, thenthe interdependencies are deemed not to match.

According to a further aspect of the invention, a microprocessor is ableto process computer programs which are selectively operable on selectedones of individual processors. A key is shared by the microprocessor anda compiler, and the key is used by the compiler to encrypt standardinstructions into encrypted instructions. An instruction buffer on thekeyed microprocessor contains logic able to route a subset of theinstruction bits from any bit locations in the buffer to destinationlogic circuits in the microprocessor. The instruction bits reach aprogrammable instruction decoder, and the routing of the instructionbits is controlled in accordance with the key.

According to a further aspect of the invention, a computer program isexecutable on a selected processor. The processor buffers instructionsas instruction bits on the microprocessor. A subset of the instructionbits are routed from bit locations in the buffer to destination logiccircuits in the microprocessor. The instruction bits then reach aprogrammable instruction decoder.

According to a further aspect of the invention, a microprocessorprocesses computer programs which are selectively operable on thatparticular microprocessor. Logic instructions for executing encryptedprogram instruction are received at memory locations. Logic circuitrymodifies operation of the microprocessor in accordance with logicinstructions stored in the memory locations. The logic circuitry isconfigurable in accordance with the received logic instructions.

In the invention, a microprocessor uses a programmable instructiondecoder to decode encrypted instruction op codes. The decoding isaccomplished without decrypting the op codes and logic gates immediatelyprocess data. The data representation changes change during theexecution, which has the effect of securing the program from analysisfor decryption.

A custom instruction set is provided for each CPU chip or groups of CPUchips. That custom instruction set is used by the software manufacturerto provide a unique version of a mass produced program to a customer forprogram operation with a microprocessor chip. The CPU is thereforeprogrammed for that custom instruction set. The length of eachinstruction, and the other features of this invention are configurableto have according to the present invention cryptographically significantlevel of security when viewed from the IC pins. Pirates who examinesignals inside the IC will accordingly be deterred from success by theinventive features described herein.

A secure key is used in configuring both the encrypted software with acompiler and the microprocessor system executing the encrypted softwareso that the instructions provided by the compiler are only executable byan IC which use the same key. This key is stored on the IC innon-volatile memory, and it controls the instruction decoder, thereconfigurable logic, the signal routing, the error corrections to theinstructions executed, the sequencer circuit, and instruction buffercontent interdependency checking circuitry. The key also determines theprogram counter operations which would not be incremented in the usualmanner. The key also controls instruction result obfuscation circuits sothat common microprocessor results, such as the ANDing of two operands,are not easily recognized by the surreptitious observer. The keycontrols memory mapping in the IC so that physically fixed memoryresources are allocated in different ways for ICs with different keys.

The way instructions are executed ensure that, an adversary attemptingto pirate the software will have difficulty understanding the results ofinstruction execution. It is a goal of the present invention toanticipate pirate attacks, and to provide measures which will thwarttheir tactics. The microprocessor chip according to the presentinvention will use instructions, data, addresses, and RAM memory as wellas instructions with bits in each instruction configured cause confusionfor attackers, but which are disregarded by the instruction decoder ofthe present invention during execution.

According to another aspect of the invention, physical aspects of thelogic architecture are varied according to keys. Software compiledaccording to the keys is implemented so as to accommodate these changes.This allows variations in memory block size and layout, as well asvariations in pipeline use. Since each CPU could be provided with adifferent key, the software compiled according to one key would not workwith a CPU varied according to a different key.

According to another aspect of the invention, a CPU has its logic gatesconfigured to perform variable logic instructions. The logic gates maybe reconfigured according to a key. Even though the instructions may becoded to obscure their meanings, the instructions still specify ordinaryoperations like AND, OR, ADD and COMPARE. So to make these operationsmore difficult for an adversary to recognize, measures will be taken.The logic gates which calculate the result of each basic operation willbe variably allocated from several possible sets of logic gates. Also,the result of the basic operation will be made more obscure than isnormally done. The operands that are used as inputs to the logic for thebasic operations can be in two different formats, so an adversary has adifficult time understanding what is going on.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram which illustrates major components of the inventiveCPU, in which instructions are compiled for execution by the specificCPU.

FIG. 2 is a diagram which illustrates how instructions are routed fromthe instruction buffer of the microprocessor under control of keyedswitch bits.

FIG. 3 is a diagram which shows an example of an implementation of theencryption done by the compiler according to the invention.

FIG. 4 is a diagram which shows the reverse wire crossing done by theCPU according to one embodiment of the invention.

FIG. 5 is a diagram which shows how interdependencies between operationsare checked in the instruction buffer.

FIG. 6 (prior art) is a diagram which illustrates how memory placementon a typical microcontroller is implemented.

FIG. 7 is a diagram which illustrates how memory placement according tothe present invention differs from ordinary microcontrollers.

FIG. 8 is a diagram which illustrates where the ROM sections may beplaced in a microprocessor system according to the invention.

FIG. 9 is a diagram which illustrates how instruction results areobfuscated.

FIG. 10 is a diagram which shows how multiple access flags can be placedwithin a CPU according to the present invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 is a diagram of a microprocessor system according to the presentinvention. In the embodiment shown, the microprocessor system includes aCPU 11 fabricated on a single chip. The CPU 11 according to theinvention includes reconfigurable logic 13, a programmable instructiondecoder 15, fixed data stores such as a serial number block 17, ROM 19,and variable data stores such as a random number generator 21, RAM 23,and E²PROMS 31-35. A control circuit 37 and check logic system 39 arealso included on the CPU 11. The diagram further shows the flow ofencrypted information from a compiler 41, which produces a softwareprogram for the inventive CPU 11. It is of course understood that thesoftware content can be transferred indirectly to the microprocessorsystem, and may involve intermediate program storage as well as otherperipheral functions.

Software is provided for execution on the CPU 11 in a selected languagesubject to compilation into standard op-codes. Then these op-codes areencrypted using a key which matches the key used for configuring theinventive CPU 11 during execution. The encrypted OP-codes are combinedwith camouflage or surplus bits according to one aspect of the presentinvention and the resulting code string, thus, has its bits permutedaccording to the key. The resulting bit string is then gathered intolong instruction words, such as 128 bit words, and these long words aregathered into multi-word groups that will fit in the instruction bufferof the CPU 11. Some camouflage bits are replaced by interdependency bitsthat will be dependent on other interdependency bits in other longinstruction words. These encrypted long instruction words may then bedistributed without further protection to the CPU 11 having the matchingkey configuration. The encrypted instructions are thus in a form thatcan only be executed by a microprocessor configured according to thematching key. When the instruction buffer of the CPU 11 is loaded withseveral long instruction words, interdependencies are checked by logicgates, permutations are reversed, and encrypted op-codes are recovered.Decryption is not performed to provide standard op-codes, because theinstruction decoder on the CPU 11 responds to encrypted op-codes. Someof the camouflage bits are error correcting codes to be used on errorsthat were intentionally put in the instructions or data.

In FIG. 1, the CPU 11 is shown including predetermined functional blocksincluding logic circuitry, represented at 13. In order to allow the CPU11 to execute programs which are encrypted, the CPU 11 also includes aprogrammable instruction decoder 15 as well as circuitry to storeinformation specific to that particular CPU 11. This specificinformation includes serial number information 17, additionalidentification information in ROM 19, a random number generator 21, andrandom access memory 23. The logic 13 is structured so as to bereconfigurable according to key bits, ROM bits and externally providedinstructions.

The CPU 11 is further configured with a distributed plurality of memorystores used for specific decoding information and for increasing thelevel of security. In one embodiment, these memory stores are providedas E²PROMS 31-35. The use of E²PROMs permits the information to berewritten to the CPU 11 but to remain as nonvolatile. The E²PROMs 31-35are used to specify particular configurations of the reconfigurablelogic 13 of the CPU 11.

According to the invention, once the CPU 11 is configured in aparticular way, in order to use the particular configuration, it isnecessary to compile program instructions which are modified in order tobe executable by the particularly modified CPU 11. This is representedby the depiction of the compiler 41 connected to the CPU 11 by acommunications line 43. If there is a change in the logic and op codesduring program execution, these changes are coordinated in order toenable continuous execution.

The keys used for encryption and corollary configuration may be chosenat random. Each key is expanded according to one embodiment to a longerset of non-volatile bits that control the microprocessor's logiccustomization, and may be called “switch bits”. Some of the key bitscontrol the instruction decoding and other key bits control hardwarememory and logic allocation. These parts of the key may be controlledindependently.

A Microprocessor as a Block Cipher

FIG. 2 is a block diagram of the programmable instruction decoder system15 including an instruction buffer 51 containing multiple registers 53,55, and 57; and associated multiplexers 63, 65, and 67 which areconnected to the multiple registers 53-57. FIG. 2 also shows amultiplexer control circuit 69 and a sequencer 71 which is part of thecontrol logic system 37. The registers 53-57 in the instruction buffer51 are used to store instruction words processed by the CPU 11, and themultiplexers 63-67 receive multiplex control codes from the multiplexercontrol circuit 69 which in turn receives instruction codes from thesequencer 71 in turn. The sequencer 71 in turn determines a particularsequence that the registers 53-57 deliver their data for furtherprocessing, so that it is possible to provide this data from theregisters 53-57 in different orders, as determined by the sequencer 71.In addition, the multiplexers 63-67 can be used to control otherfunctions. By way of example, multiplexer 63 is shown controlling asequencer reset code stored at block 75. Error correcting codes storedat block 77 are controlled by multiplexer 65, which controls errorcorrection operation, as represented at block 79. The error correctioncircuitry 79 is also supplied with key bits stored at block 81. Op codesreceived from multiplexers 63-67 are held at register 83, after beingprocessed by the error correction circuitry 79. It is noted, however,that it is also possible to provide information from the differentmultiplexers 63-65 to different circuits. By way of example, multiplexer63 provides configuration information to the error correction controlcircuit 77.

Since the execution of the code, as encrypted, is accomplished by theoperation of the microprocessor, no actual decryption algorithm isneeded. Therefore, it is possible to operate encrypted instructions in acomputer without decryption. This protects encrypted programs fromattacks during encryption. This also makes it possible to provide securesoftware to persons who are not eligible to receive data decryptionprograms.

Mapping of a “block cipher” according to the present invention to acomplicated microprocessor hardware basis enable logic reconfiguration.In the past, block ciphers have operated on abstract information, withthe microprocessor that performs the cipher being an exact copy of manyother ICs. The invention changes the paradigm from the realm of abstractinformation into the realm of reconfigurable logic that forms a machine.Instead of manipulating data in complicated ways using concepts that areintended to create bewildering informational complexity, this inventionmanipulates complicated hardware using concepts that should presentadversaries with an IC that seldom has the same major signals used onthe same conductors for different ICs. Each CPU chip produced, accordingto the present invention, has an instruction set that can be differentfrom the instruction set of any other processor. It is not data that isbeing descrambled by a standard microprocessor, it is a microprocessorthat is configured to execute particularly scrambled code. Complexitytheory is used in the logic reconfiguration and in the input and outputcodings so that the degree of complexity may be compared to thecomplexities produced by ordinary block ciphers.

Errors Which Are Introduced Intentionally

Encrypting of the software is accomplished, according to one aspect ofthe present invention, by errors which are intentionally placed in thedata and/or into the instructions. The errors are then error-correctedby on-chip circuitry. Since there are a variety of ways to perform errorcorrection, the particular form of error correction is selected at thetime of instruction encryption and that particular form of errorcorrection is used to correct the errors on-chip. By way of example, theerror correction may be a form of Hamming code. Since there is more thanone way to perform this type of error correction, the data orinstructions would be essentially useless without providing theinformation concerning the particular type of Hamming code being used.

These codes can come in many varieties, and they can be key-dependent.The long instruction words may contain modifications to the errorcorrecting codes to that data and can have varying error types andcorrection types.

Program Executed Without Requirement for Decryption

The inventive CPU 11 is not a data decryption device, according to thepresent invention. The inventive CPU 11 is designed to receive scrambledinstructions but not to decrypt them. Instead, it uses scrambledinstructions and outputs results from calculations by operating in amode that accommodates the particular encrypted form of the data. Theprograms themselves can be written in such a way that data decryption isperformed. Optionally, data encryption and decryption software can bewritten for the inventive CPU 11, as for any other CPU, but that is notthe focus of this invention. The “Complexity Theory” which may beapplied to an implementation of this invention would provide an analysisof the work complexity magnitude which the scrambling andtransformations provide. This work complexity is adjustable by thecomputer architects who specify the detailed implementation of thisinvention. It is envisioned that the complexity will be on the order of2{circumflex over ( )}55 operations, similar to that of “weakcryptography”. That amount of work would enable an adversary to produceinstructions which perform the same calculations as the encryptedinstructions.

FIG. 2 illustrates how instructions are used from the instruction bufferunder control of keyed switch bits that change the wiring of the logicsignals. These signals eventually go to the instruction decoder. Theprogram counter will not be operated by incrementing by one. It will beincremented by m, a number determined by the key, the serial number, thesequencer 71, and the instruction buffer non-instruction contents andinstruction contents. Addresses for instructions that are executed insequence are not sequential addresses, but are arranged by the compilerto be loaded into memory locations which conform to the program counterincrementation plan. For example, if “long instruction words” are 128bits long, and each instruction has 9 OP-codes, and there are 4 longinstruction words in the instruction buffer, then the program countermay increment by amounts from 2 to 18 (modulo 9*4). The compiler wouldhave provided for this scheme by gathering op-codes into locationsplanned with this incrementation plan taken into account.

The sequencer circuit 71 is included so that more complexity is designedinto the instruction execution operations. Some of the key bits are usedto initialize the sequencer 71 when it is reset. Then the sequencer 71produces a new output code on each n clock cycles. This code will belogically combined with encrypted instructions to feed codes to theinstruction decoder. The compiler shares sequencer information in commonwith the CPU 11 because they share a common key, so the encryptedop-codes are prepared for the logical combinations which the sequencer71 will provide. This increases the complexity by making eachinstruction have a varying code that depends on the sequencer 71. Forexample, the ANDing instruction would have one code the first time it isused, and a different code the second time it is used. The number n,which is the number of clock cycles between new sequencer codes isdesigned in coordination with the data output block size. If the dataoutput block size is 1 byte, n is 1. If the data output block has 8bytes, n may be up to 8. The intention is to obscure the relationshipbetween an encrypted op-code and a result so that adversaries cannotsimply feed chosen OP-codes and data to the CPU 11 and observe a simplerelationship between them. With this plan, the adversary will observethat a block of output data has a complicated relationship with chosendata inputs and chosen long instruction words loaded into theinstruction buffer. The CPU 11 will require that the instruction bufferbe filled before any data results are output.

Complexity theory is used in the logic reconfiguration. Adversaries whotry to observe the signals on the CPU 11 will encounter more variabilitythan on ordinary ICs. Logic functions will be allocated depending on thekey and on the sequencer 71. Each CPU 11 with a different key usesdifferent metal lines and other conductors to use different logic gatesfor standard functions of a microprocessor.

A memory remapping capability will be implemented on the CPU 11 so thatmemory resources on the CPU 11, which have fixed locations on thesilicon chip, will be allocated to be used for different programvariables, depending on the key.

Instructions Longer than Minimum

As an example, each instruction may be 128 bits wide (16 bytes). Alsosuppose standard op-codes are one byte each. If only 9 encrypted opcodes are put in the 16 byte instruction, this leaves 7 bytes forcamouflage, error correcting codes, sequencer reset codes, andinterdependency codes. A wire crossing will permute the 128 bits whenthe compiler creates the 128 bit instruction, and the CPU 11 with theright key will reverse this wire crossing before using op-codes for theinstruction decoder. The op-codes are well-known in the art ofmicroprocessors and are a form of an abbreviated instruction set. Anexample of op codes are shown in Appendix 5 (page 316) of Malvino,Digital Computer Electronics, second ed., 1983, ISBN 0-07-39901-8.

FIG. 3 shows an example of an implementation of the encryption done bythe compiler 41 and FIG. 4 shows the reverse wire crossing done by theCPU 11. Referring to FIG. 3, the compiler 41 receives information from aprogram source at an input circuit 101 an output encrypted instructionsto the CPU at an output circuit 103. The output at 103 is encrypted forthe particular CPU 11, as identified by a key provided by the softwarevendor and a serial number of the CPU, stored on the CPU 11 at 17 (FIG.1). The key and the serial number are expanded at key expansion circuit111. The key expansion circuit provides information to an op codetranslator 113, an error production circuit 115, a sequencer scheduler117 and an instruction buffer model 119. Op codes are provided bysoftware source code from the input 101 and translated into object codeat an op code compiler 121. The compiled op code is translated by the opcode translator 113 in accordance with the expanded key from the keyexpansion circuit 111. The translated op codes are then provided to theinstruction buffer model 119. The instruction buffer model 119 performswire crossings of bits to form encrypted instructions.

The error production circuit 115 inserts errors in an instruction setstored in the instruction buffer model. Since the CPU 11 includes anerror correction circuit 79, it is possible to use the errors providedby the error production circuit to insert errors which are correctablein a predictable fashion. The error correction circuit 79 is then ableperform error correction in a predictable fashion in accordance witherror correction data supplied by error correction code circuit 77. Theerror production circuit 115 receives its control information from thekey expansion circuit 111 and therefore the types of errors producedmatch those which can be anticipated to be corrected. Moreover, certainclasses of errors can be safely inserted assuming a known errorcorrection algorithm is being used. The successful correction of theseerrors can be presumed, but only if the known error correction algorithmis used. Therefore, the successful correction of intentionally insertederrors by the error correction circuit 79 can be assured.

The instruction buffer therefore provides output instructions whichinclude translated op codes, the errors, the sequence schedulinginformation from the sequence scheduler 117, and key expansioninformation. This data is provided to the output circuit for providingencrypted compiled instructions along communication line 43.

In FIG. 4, long instruction words are used in the instruction buffer 51of FIG. 2 which permit reverse wire crossing by the CPU 11. Each of themultiple instruction registers 53-57 includes more bits than are used toprovide the op codes provided at instruction decoder 83. As representedin FIG. 4, the locations of bits within these instruction buffers israndomized according to the expanded key. The connections between theindividual bits in the multiple buffers 53-57 is therefore random, asrepresented by the errors in FIG. 4. There are, however, no hard wireconnections from specific bits in the multiple instruction buffers 53-57to the instruction decoder 83; instead, the data from the registers53-57 are provided to the instruction decoder 83 through themultiplexers 63-67 shown in FIG. 2.

Instruction Buffer Interdependencies

Since the blocks of instructions are larger than they need to be,interdependencies between bits of separate instructions can be providedso that the CPU 11 may check these dependencies for conformance tocriteria shared by the compiler 41 and the CPU 11. FIG. 5 shows howinterdependencies are checked in the instruction buffer.

FIG. 5 is a block diagram of the instruction buffer 51 and a check logicsystem 39 according to the invention. The check logic system 39 providesan instruction interdependency check between data provided from themultiple registers 53-57. By combining key bits and serial number bitswith selective outputs from the multiple registers 53-57 it is possibleto provide a verification of the authenticity of information beingtransferred through the instruction buffer 51. Different bits storedwithin the multiple registers 53-57 may include instruction op code bits(represented by I), error correction code instructions (represented byE), sequencer reset codes (represented by S), and validate dependencybits (represented by V). In addition, since there are more bits withinthe multiple registers 53-57 than required for transferring operationinstructions, it is possible to provide camouflage bits (represented byC), which make it increasingly difficult to resolve the stored bits ofinformation from the shift registers to a decoding algorithm.

Fetches from external memory are in blocks of b words, where b is anumber between 2 and 32, usually. Not all of the fetched bits are used.This causes confusion for adversaries who try to interpret the behaviorof the chip from its pins, without observing internal signals. Some ofthe bits are there for camouflage so an adversary may waste timeanalyzing them. Some bits just separate useful bits so that adversariescannot tell which bits should be combined to compose an op-code. Oneencrypted op-code may have bits in more than one 128 bit instruction inthe instruction buffer.

Instruction block sizes are larger than a predetermined minimum size forperforming computational functions of the CPU chip 11. Programs compiledto execute on the CPU 11 are compiled in a manner to utilize blockallocations of instructions according to a key. Since the blocks ofinstructions are larger than they need to be, interdependencies betweenbits of separate instructions can be provided so that the CPU may checkthese dependencies for conformance to criteria shared by the compiler 41and the CPU 11.

Logic Architecture that Comprehends Physical Implementation in a CPU

Referring to FIG. 6, a prior art CPU 131 may include specific regionsfor random access memory (RAM) 133, read only memory (ROM) 135 and anon-volatile memory such as E²PROM memory 137. The purpose of thedifferent types of memory 133-137 may be varied, although RAM 133 istypically used for program manipulation, while ROM information 135 isused for fixed data. E²PROM is less easily manipulated because of thetime it takes to write to E²PROM, and is used for program actioninstructions and other data which is written to the CPU 131 at one timeor occasional basis.

Referring to FIG. 7, each memory type used on the invention (RAM,E²PROM, PROM, ROM, anti-fuse, fuse, laser-link) appears in severaldistributed block sizes in the physical layout, including for example 1bit memory elements which are used in logic in a static way. Accordingto the invention, there are hundreds of distributed single bit memoryblocks used to comprise an entire memory unit. The CPU 141 can include a16 bit block of memory used to control reconfigurable logic according tothe invention and the memory can be in larger n bit arrays, as isnormally seen on ICs. This tactic increases the complexity of the workthat an adversary must perform. The distribution of memory on a CPU issuch that the various forms of memory are widely distributed. Thus,various distributed segments of the CPU 141 are allocated for RAM 143ROM 145 and E²PROM 147. This provides several advantages:

1. Multiple applications which use one CPU may have separate memoryblocks. This provides more secure separation of information than if onlyone memory block were to be used to hold information for multipleapplications.

2. In order to provide keyed information and instructions which areparticular to a specific CPU 141, the instructions are written atmultiple locations. Thus, the modified instructions for performing anoperation under one particular variant of a program may requireinstructions changes at various stages within the CPU 141.

3. By locating memory used to reconfigure the CPU 141 at differentlocations, it becomes more difficult to analyze the CPU to determinewhich specific codes are provided to the CPU 141.

The configuration of the logic architecture is varied according to keyswhich are used to encrypt the software and to operate the deconvolutingoperational logic of the CPU 11 according to the invention. Softwarecompiled according to the keys is implemented so as to accommodate thesechanges. This allows variations in memory block size and layout, as wellas variations in pipeline use. Since each CPU 11 could be provided witha different key, the software compiled according to one key would notwork with a CPU varied according to a different key.

The keys are preferably programmable in non-volatile memory, such asE²PROM (erasable programmable read-only memory) cells on the chip. TheIC can hold many keys and they can be erased and re-programmed manytimes. The chip manufacturer need not know any of the keys on the chip.The user has possession of the chip's security capabilities, and candecide whether to accept or reject conditions established by softwarelicenses. In other words, the user can purchase a microprocessor chipwith all keys in a blank state, and then optionally load keys or notload them.

Normally, the user will never need to load a secret key, but only publickeys. The user also has the option of loading secret keys, instead ofusing the internal key generation procedure, described in the nextparagraph. There is no function available to read keys out of themicroprocessor chip after they have been stored in non-volatile memory,but an authorized user can erase all of the keys. The trustworthiness ofthe IC manufacturer is not provable, but it is a goal of this design toinclude no hardware on the IC that provides a back door for themanufacturer to use. Software can be loaded into the chip to performsecret functions that are not provided by any special hardware, but nosoftware has the power to control all of the hardware.

The keys for the IC and the compiler 41 may be chosen at random andgiven to the compiler 41 and IC by secure means. However, the followingdescription is one in which the IC creates the keys. The keys aregenerated by an on-chip random number generator and are kept temporarilyin RAM. A public key for a software vendor is entered into the IC andthe key is encrypted with that public key. This encrypted key is sent tothe software vendor so that a purchased program can be compiled toproduce instructions that will only be executable by the IC that createdthe key. The IC uses the key to produce the custom instruction decoderfunctions by programming non-volatile memory cells in the instructiondecoder. The IC then expands the key into an “expanded key” and storesthis expanded key in non-volatile memory cells around the IC. These bitsof the expanded key control switching circuits, reconfigure logic, andin general, customize the IC to implement all of the security featuresdescribed in more detail in the remainder of this text and figures.

The keys will be made partly from unalterable ROM, and partly from PROMwhich can be programmed. In addition, E²PROM memory which can me erasedand rewritten can hold some of the key bits. By using more than onememory technology and more than one memory location to hold key bits, itmakes it more difficult for an adversary to discover all of the bits ofthe key.

The inventive arrangement focuses on two levels of vulnerability forICs: the pins on the IC package and the internal signals on the ICinside the package. According to this aspect of the invention, amicroprocessor has its conductors allocated and its logic reconfiguredinto a scrambled arrangement, depending on a key. It can operate onordinary data in ways that are so different from other copies of the IC,so that most adversaries are prevented from learning valuableinformation about the keys, about some ROM bits, and about theinstructions. Those adversaries who do learn that information may oftenbe prevented from profiting by that information by techniques thatfurther vary the operation of individual CPUs. Additionally, the dataoperands and results, which are not encrypted, have their usefulnessobscured to adversaries. Data encryption can also be used as a higherlayer of protection.

This aspect of the invention uses a microprocessor that is beingscrambled to process standard data. The architecture is designed withthe physical layout in mind, but it does not depend on that level ofdetail. This architecture brings together the need of the end user withthe planning of a microprocessor architecture, so that implementors havethe framework of security upon which they can specify detailedimplementations which comprehend past security attacks.

Instruction Result Obfuscation

It is possible for the CPU 11 to have its logic gates configured toperform variable logic instructions. The logic gates may be reconfiguredaccording to a key. Even though the instructions may be coded to obscuretheir meanings, the instructions still specify ordinary operations suchas AND, OR, ADD and COMPARE. So to make these operations more difficultfor an adversary to recognize, measures will be taken. The logic gateswhich calculate the result of each basic operation will be variablyallocated from several possible sets of logic gates. Also, the result ofthe basic operation will be made more obscure than is normally done. Theoperands that are used as inputs to the logic for the basic operationscan be in two different formats, so an adversary has a difficult timeunderstanding what is going on. This is a tactic called plausible wronganswers. In this plan, two correct operands and two plausible wrongoperands are sent to ADD circuits. Two answers are calculated, a correctanswer and a plausible wrong answer. These two results are then sent toseparate other circuits for further buffering or manipulations. Thisbifurcation, when combined with large data output block size introducessome uncertainty into the analysis done by adversaries. Plausible wronganswers may be included in data output blocks, but would not be used byexternal devices which are compliant with this scheme.

Referring to FIG. 8, there is shown a diagram of CPU 11 comprisingvarious ROM bits 141 including serial number information 143, andreconfigurable logic 145. The ROM bits 141 are distributed about theintegrated circuit CPU 11 has the advantage that different controls forthe CPU logic can be located at different locations. Thus, if a portionof the logic is reconfigurable, then the actual function of that logiccan be more readily controlled by the ROM. In addition, it is possibleto mix depletion mode and enhancement mode bits in ROM 141, so that avisual analysis of the CPU 11 does not reduce to a clear analysis of thestatus of various logic gates and bits.

FIG. 9 shows the logical operation of obfuscation of logic executed bythe CPU and illustrates how instruction results are obfuscated. By theuse of reconfigurable logic gates as described in connection with FIGS.1-2, one is able to provide a combination of correct and incorrectanswers for each logical operation. Thus, if an operation is defined asusing operands A & B, multiple operands can be provided, thus resultingin correct answers, as well as incorrect answers. The purpose of thisinvention is to make it more difficult for an adversary to gain valuableinformation by observing signals on ICs. Since instructions are neverdecrypted into ordinary codes, this is an advancement over earlier chipsthat have adversaries.

The issue arises about recognizing instructions by the actions taken bythe ALU pipeline in response to the nonstandard instructions and dataformats. For example, there may be an instruction called AND which takestwo operands and calculates the bit wise ANDing result. So someone mayexpect it to be easy to recognize the instruction by its result.Therefore a technique proposed in this invention is to design logicwhich is difficult to interpret. In this example, the logic dedicated tothe AND function would be configurable into a variety of forms dependingon the key, so two different chips would usually have different logicgates allocated to perform the function. Also, a variety of resultstorage gates would be available to be allocated to hold the result ofthe ANDing of the operands, and the key would determine which gates arethe ones which are used on a particular IC with a particular key.

This variability of logic gate allocation for instruction execution andresult storage will make it more difficult for an adversary tounderstand the operations which take place. False result gates will beallocated to hold wrong results after the instruction is executed tobaffle adversaries.

The two data operands can have different data formats (differentnumerical representations) and the ADD logic gates will take thesedifferences into account to produce a correct answer. Similar techniquesfor SUB, MULT, etc. (standard instructions) will provide variableallocations of logic gates for different ICs depending on the key. Thismultiplicity of key-dependent logic implementations for standard logicand arithmetic operations will increase the die size but even more, itwill increase the difficulties for adversaries to profit from signalobservations.

The CPU 11 is provided in which its logic design is variable, and when aprogram is provided for use in the particular computer, the program iscompiled in accordance with the architecture supplied by themicroprocessor. Therefore the microprocessor has a variable instructionset, at least with respect to which functions are generated by whichprogram sequences in object code.

The variability is established by and is supplied to the CPU 11 inmemory stores established by E²PROM, ROM and RAM memory on the CPU 11.Thus, when a program is provided for use in the particular computer, theprogram is compiled in accordance with the architecture supplied by theCPU 11 as determined by the key. Therefore, the CPU 11 has a variableinstruction set, at least with respect to which functions are generatedby which program sequences in object code. The architecture of aparticular chip may be established during the logic design of the chip,thereby defining the architecture for each CPU chip independently.

ROM Implementation

The ROM will hold a serial number, key fragments, customized switchbits, and ordinary microcode. Key fragments are about 8 bits of ROM thatare appended to the rest of the key that is stored in programmablememory. Custom switch bits are ROM cells which control inputs tomultiplexers and logic gates so that signal routing for logic gateallocation will be partially controlled by these bits. Microcode iscommonly used on ordinary microprocessors for general purposes.

Wafer masking techniques usually use “reticles” which can have one orseveral IC images on each reticle; 4 to 16 ICs per reticle are common.This means that 16 ROM versions can be defined for each silicon wafer.All wafers from a fabrication run will have the same reticles. The 16ROM versions can have 16 key fragments present, each 8 bits in size.These key fragments would be on the lowest planar level on the physicalIC.

The key will not be limited to the lowest layers of the IC structure, assome of the ROM bits should be. Some low level ROM bits will control theallocation of some logic gates. The values of these secret ROM bits aredirectly mapped to the ROM serial number which is partially made public.So not every chip made according to the invention is the same, evendisregarding the keys stored in E²PROM cells. If there are 16 versionson a wafer, then many wafers will share the same 16 ROM codes. ROM bitsmay be in arrays or in a single bit configuration so that they arescattered around the die to customize logic in ways that are revealed bythe serial number. In this way there appears to be 16 different ICdesigns due to the reticle design mentioned earlier. FIG. 8 illustrateswhere the ROM sections may be placed on the IC.

Preferably depletion implant ROM processing will be used because this isknown to be difficult to observe visually. A depletion device usually isan n-channel MOS transistor that has a negative threshold voltage. Thepurpose is to use two non-volatile memory technologies to storeinformation which reallocates logic gates to form the CPU. By usingdepletion ROM as one of those technologies, some signals can remain onlyon the lowest planar conductor layers of the IC structure. This makes itmore difficult for some adversaries to measure the states of the logic.

The invention makes use of reconfigurable logic pervasively. Thisreallocation of logic gates under control of the key bits and ROM bitsis largely what makes this idea valuable. This makes it difficult foradversaries to profit from signal measurements.

Serial Number Utilization

Serial numbers are sometimes sent in public view, and keys are normallysecret. Each chip will have a unique serial number which is partlystored in ROM and partly stored in E²PROM. The serial number is sent tothe compiler 41 so that the ROM hardware customization bits will bespecified. For example, if 16 ROM versions are produced, as previouslydescribed, then there will be 16 ways in which logic hardware will beallocated under control of the ROM codes. The serial numbers stored inROM will also have 16 values coded in as little as 4 bits. This is onereason for having a serial number.

A second reason for having a serial number is to uniquely identify an ICwithout using cryptography.

A third way to use a serial number is to encrypt it using a public keyand then sending it to the owner of the public key to be interpreted.

Optionally, this invention uses a new technique called the “partialserial number strategy.” This strategy is to never show the whole serialnumber in public, but to only show part of it. The serial number mayhave 128 bits, for example. Which part of the serial number is shown isunder control of some key bits. By using only a part of the serialnumber, hundreds of partial serial numbers can be derived from only 16ROM serial numbers, without even using the programmable E²PROM sectionsof the serial numbers. The compiler owner has secured copies of the 16whole serial numbers so the compiler owner can compare partial serialnumbers with sections of whole serial numbers. When a match is found,the compiler owner knows which serial number the partial serial numbercame from. The serial number is needed for the compiler 41 to producesoftware which comprehends the state of the IC logic. Some parts of theROM are not serial numbers but they are secret bits which allocate somelogic gates. How these gates are allocated is under control of only theROM, and these gates should only occupy the lowest layers of the ICstructure.

The “partial serial number strategy” is intended to increase thecomplexity of the task facing adversaries who only observe informationthat is intentionally sent from a CPU chip. By using only a partialsection of the serial number for each IC, hundreds of different CPUchips will send unique serial numbers based on only 16 ROM versions.Other sections of the serial numbers only will come from E²PROM cells,and so, they are unique to each IC. One example of how the key mayselect parts of the ROM serial number is to report the serial numberafter ignoring the first m bits of it, where m is a function of the key.Other ways may skip odd bits in the serial number and report only evenbits, where that choice is determined as a function of the key (forexample a cryptographic hash of the key).

Adversaries may record and replay serial number fragments which are notvalid for their CPU ROM and key combination. If they are sent software,then it is likely that it would not be usable on their CPU chip.

Networked Interactions

The invention can be programmed to require a handshake with a server toallow continued operation, or it can be put in stand-alone mode. The keycan be changed remotely and new data formats and new software may beneeded to continue operating. Physical protection of the key is easierthan physical protection of programs, but if a key is discovered by anadversary, networked handshaking can make that captured key useless.Various plans can be created to discover the existence of captured keys,and to deal with pirates in subtle ways, without their knowing they havebeen detected. While an old key can be programmed into the inventive ICto use an old program with old data, new programs and data formats fornew keys will not be useful to pirates with old keys.

FIG. 10 is a diagram of CPU 11 showing the use of shows the use ofsatellite access flags distributed at various physical locations on theCPU 11 according to the invention. By placing various flags at differentlocations on the CPU, it is possible to provide a control function whichis varied in accordance with the specific flag at that point.

Satellite Access Flags Made Complicated

Microprocessors and microcontrollers which are designed using thearchitectural features in this description may be used for satellite TVaccess electronics, smart cards, personal computers, workstations, andembedded secure appliances for many purposes. Satellite TV accesscontrollers (set-top boxes) may especially benefit from thisarchitecture.

According to the invention, security features have different layers ofimplementation. One layer allows each of multiple users to have the samesecurity policy features. This permits some a program to be distributedto multiple users without creating customized variations of the programsfor individual users. Thus, if, for example, a satellite broadcast wereused to service large numbers of customers, that satellite broadcastcould include a program which is functional on the computers owned by alarge number of customers, without customizing the program for eachindividual user. A second layer of protection customizes the hardwarelogic and memory allocation, as described previously, so that commonlydistributed programs would be produced in unique ways using commonhardware.

FIG. 10 is a diagram of CPU 11 showing the use of distributed accessflags distributed at various physical locations on the CPU 11 accordingto the invention. By placing various flags at different distributedlocations on the CPU, a control function is varied in accordance withthe specific flag used by the control function.

Protection schemes for set-top boxes have a history of being more easilybroken than other types of cryptographic circuits. This is because thesatellites must broadcast the same cryptographic keys to many set-topboxes simultaneously. Also, for fixed instruction set processors, it iseasy to observe how the satellite key is used. The satellite key isstored in known locations on the chip and access approval flags arelocated in fixed locations. The inventive CPU 11 will reduce thesevulnerabilities. The storage for satellite keys would be scattered inmany locations on the chip with extra storage available to disguise thesatellite key. The location of the satellite key would be different foreach key and serial number, so a pirate has a more difficult task toobserve a satellite key and to sell the satellite key.

After an authorized set-top box has completed cryptographic calculationsto enable reception of the TV programming, an “access flag” may be setto the enabled state. The access approval flag has also been an easytarget for pirates: one flag bit can be set with a light beam to givethe same access that a cryptographic calculation would have provided.With the keyed allocation of hardware logic and memory which thisinvention provides, and a large number of flag circuits available,arrangements can be made to use varying flag bit locations of bothpolarities, ones and zeros. Then, some simple pirate flag settingtechniques would become obsolete. FIG. 10 shows how multiple accessflags may be placed on the IC.

In the case of multiple access flags, the multiple access flags arescattered around the chip in different locations. The access flags arealso given different polarities so that some of the bits will be 0's andsome of the bits will be 1's to allow access. The precise arrangement ofwhich bits are enabled with 1 and which with a 0 is determined byprogram instructions, including the variable instructions that are beingexecuted. As a result, each chip is different in the way it is operated.Even though the physical layout of the chip is the same, as a result ofthe variable keys and access flags, the actual bit states (1's and 0's)being represented at given portions of the chip will be different foreach chip when it is in operation.

This scattering of key bits and access flags is useful in preventingadversaries from either understanding or duplicating the results ofprogram code execution. Therefore, even though the software source codeitself may be one program, the hardware on the IC which uses this commonprogram would be allocated differently under control of some key bits.To do this, keys are expanded into a set of expanded key bits, aspreviously described. Some of these expanded key bits controlinstruction decoder operations and some do not. For satellite TVapplications in which common software is distributed to many inventiveICs, the expanded keys would provide a common instruction decoding logicwhile providing an uncommon memory and logic allocation. Thus, the keyhas two separate functions which must be coded into the key when it isproduced.

Instructions Versus Data

Data and instructions are two different categories of information andthis invention is designed to use encrypted instructions regardless ofthe data format. It is emphasized that instruction encryption is theprimary purpose of this invention, a second purpose is to scrambleon-chip logic, memory, and signal allocations, and that data is eitherunprotected, or given some small protection which does not involve dataencryption. This invention is not about data that is being scrambled bya standard microprocessor, it is about a microprocessor that is beingscrambled to process standard data.

On the chip, there will be RAM for data and RAM for instructions. Someof the bits in those memories will be there to obfuscate the code,thereby confusing attackers. For example, if two numbers are added, thetwo operands can have extra bits that are not used. The result ofaddition in the arithmetic logical unit (ALU) can have extra bits oferroneous information that are stored into the data RAM. This randomizesresults within the processor so the attacker may not be able to deducewhether addition occurred, or if the operation was subtraction, or EX-ORor other possibilities. In addition, the data memory mapping wouldbecome different for different chips.

There is an option to use a standard instruction set for an ordinarycomputer language with non-standard data representations. This providesan ability to perform mixed operation, in which standard op-codes arecombined with variable data representations. Therefore there are fourways to operate: first, with standard instructions and standard dataformats; second, with encrypted instructions and standard data formats;third, with standard instructions and non-standard data numericrepresentations; and fourth, with encrypted instructions andnon-standard data numeric representations.

Dynamically Varying Data Representation

According to a further aspect of the invention, dynamically varyingrepresentation is used for data processed in a CPU. The dynamicallyvarying representation is still usable in arithmetic and logicaloperations without being decrypted. There are many ways to representnumbers, and the inventive CPU hardware design will have apparatus tooperate on these multifarious representations, in coordination with thecompiler 41. The compiler 41 creates a schedule for varying the numericdata representations, and the chip follows this schedule to use the datacorrectly. Examples of the proposed numeric representations are:

1. Data represented in Residue Number Systems can use the ChineseRemainder Theorem to provide calculations which some adversaries willfind difficult to understand. For example, a number can be broken downinto three parts under three secret moduli. The key would holdinformation on the three moduli, without which, the number cannot beeasily re-assembled.

2. Radix conversions

3. Redundant Number Systems

When results are written to external memory, they are written in blocksof w bytes, where w is from 1 to 32 usually. Not all of the results inthis block are correct or useful results. Some results are correctresults for a wrong operation to give an adversary the appearance of abehavior which is not the behavior which is used in the program. Thiswill increase the difficulty of the task of an adversary who seeks tounderstand relationships between instructions, operands, and results.For example, if two input data operands are added, the data output blockcan contain both the sum and the difference so an adversary may not knowwhat instruction was used to produce the answer. The key would determinethe location of the correct answer. The destination for the output datablock would need to have some coordination to determine which parts ofthe output data block are correct.

Pipelined Architectural Implementation

Some microprocessors use pipelining of the arithmetic logical unit (ALU)to obtain better performance. In this example, which uses a pipelinewith 6 stages, it will be demonstrated how to implement some of thefeatures of this invention into a pipelined architecture.

Each stage of the pipeline will contribute to the techniques which makethe inventive CPU useful. The 6 stages are labelled: fetch, decode,register, execute, cache, writeback. Also, the Instruction Cache has aline size of 128 bits, which is the same as the instruction size of thepreferred embodiment.

In the Fetch stage of the pipeline, the instruction buffer holds fourentries and the compiler 41 can use this buffer arrangement to provideinterdependencies between instructions in groups of four to increase thecomplexity for any attacks that may be attempted. Bits of instructionsin the instruction buffer are set to cross-check each other in a mannersimilar to parity checking. At this stage of the pipeline, hardware cancheck different bits in several instructions to verify the validity.

The Decode Stage of the pipeline usually allows instruction folding, butthis can be changed to allow instruction buffer dependency checking, tocompose error correcting codes from the key and instructions, and tore-arrange bit substrings in the wide instructions to make decoding moreefficient and to display camouflaging behaviour to any unauthorizedobservers. Errors in the instructions will be corrected at this stage.In addition, it is possible to include camouflaged bits in theinstructions. The camouflaged bits may then either be stripped, orchecked by separate circuitry in order to determine the existence of thecamouflaged bits.

The Register stage of the pipeline will be involved with using thevariable numeric representations. Type checking of data will importantto using the correct arithmetic operations on the operands involved.This stage will also perform error correction on data.

The Execute stage of the pipeline may involve Object Field manipulation.Object Fields can have data that is scrambled before they are presentedto the CPU chip. During the Execute stage, data can be unscrambledbefore being operated upon arithmetically. This makes the data lessusable outside of the setting of the inventive CPU.

The Cache stage of the pipeline writes audit information to a securitycache which is not normally visible to unauthorized users. Also, thereis one extra register that is visible to users, and which can havevarious uses, such as a watchdog timer, which the program is required towrite during the cache stage. At the security cache, any discrepancieswhich may have occurred earlier are noted, an audit may be performed,and flag bits set. At this point, it is not necessary to notify the userbecause the user may or may not be an authorized user of the software.

The Writeback stage of the pipeline may initiate a server handshake. Atthat point, information regarding security flags may be transmitted backto the server.

In the inventive CPU, instruction op codes are provided in such apipeline architecture, and an information key is established. Theinformation key provides instruction security commands in the multiplesteps of the pipeline architecture, and an arithmetic logic unit (ALU,part of the logic 13 shown in FIG. 1) provides variability of logiccircuitry for program execution. The execution can be performed usingencrypted op codes or using standard op codes that provide standardinstruction operation types.

Compiler Interactions

The compiler 41 will be designed to comprehend all aspects of the CPU 11implementation of the architecture described for this invention. The keythat is shared with the compiler 41 and the CPU 11 determines operatingcharacteristics of the program counter, sequencer, wire crossings forthe instruction buffer, interdependencies in the instruction buffer,error correcting plans, data representations, instruction encryption,output block size, memory allocation, secure memory partitioning, andall other details needed to use functions on the CPU 11.

There is more than one way to implement the invention, so more than onecompiler type may be needed. In particular, the key can have twosection: one for controlling instruction encryption and execution, andanother for controlling unrelated hardware reconfigurability. In otherwords, the compiler 41 must be able to use a key so that a singleencrypted instruction stream is available to many ICs which havedifferent physical memory allocations, different result obfuscationcircuit allocations, and various other reconfigurable logic resourceswhich do not interfere with the execution of a common encryptedinstruction program used on many ICs. Then the invention would be ableto thwart power analysis techniques that seek to discover the key. Eachtime a smart card cryptographic key is used in a transaction, logiccould be re-allocated so that power use would change.

Key Management

Key distribution could be handled securely by a variety of means. In apreferred embodiment, each chip has a public serial number. A secondnumber, the key, could be provided by a Random Number Generator (RNG) onthe CPU 11. The RNG may use the principles described in U.S. Pat. No.4,694,412 “Random Number Generator for Use in an Authenticated Read-OnlyMemory”, to Alan Folmsbee. This RNG uses several oscillators withcapacitive feedback from the random number to alter their frequencies.This RNG also has small local heaters that turn on and off at irregularintervals to provide unique thermal histories for each session of keygeneration. Thermal noise and radioactive decay also provide randomness.A key is generated by this RNG and it is stored in non-volatile memory.The RNG may also create more serial number bits to be stored inprogrammable memory. In this way a user can customize the serial number,for added flexibility.

The public key of the software company is loaded into the microprocessorchip as used in this invention. The key is encrypted with that publickey. The encrypted key and the serial number are sent to the softwarecompany. The software company decrypts the encrypted key with itsprivate key and examines it to determine if it has acceptablestatistical properties. If it passes those tests, the software companyuses that key to encrypt the purchased software with the algorithm thatthe invention requires. The software company sends the encryptedsoftware to the customer. That software will only be executable on onemicroprocessor chip; that is, the one that generated the random key.

The CPU 11 can have a large number of keys stored in E²PROM cells sothat software may be executed. The software may therefore executeinstructions from many sources using different keys. Each key iscomprised of multiple bits which alter the instruction decoders,obfuscation circuits, and the arithmetic logic unit (ALU). The softwareis not decrypted before execution, but selected software bits will berouted by “keyed wiring” to supply the correct instruction, data, andaddress bits to the correct circuit blocks.

There would be a facility for the software to alter its own key undercertain circumstances. For example, the software license may requiremonthly payments to be made. If the payments are not made, the softwarecan alter the internal key. To accomplish this, a permission code may berequired to be downloaded from the Internet before the program is run apredetermined number of times. The chip sends an audit code to thesoftware company and then the permission code is sent from the softwarecompany which is a customized number for each microprocessor chip forone program. The intent is that the customized number permits thesoftware to be used by one user. The chip may give warnings aboutimpending key modification, so the user has plenty of time to get thepermission code. While the program is running, a real-time-clockemulation program can keep clock time so that it can tell when a timeperiod has expired since the program was started. That is in addition tothe limit of times the program can run without a new permission code. Aclock frequency detection circuit can detect whether the clock isstopped or slowed too much.

Another circumstance may cause the software to erase its own key; thatis if the chip is being tampered with. The microprocessor chip as usedin this invention can have light detectors or e-beam detectors that setoff the alarm. It could detect the presence of probe capacitances,broken metal lines, and irregularities in bond-pad inductances. A silentalarm might cause a prompt to appear, for the user to send another codeto the software manufacturer in the manner used for monthly billingaudits. In essence, it is a silent alarm. The software company can thenrespond with something other than the usual permission code.

Key bits and access flags may be placed in certain locations on asemiconductor die. A memory array of E²PROM cells are used to hold thekey bit. Numerous small arrays of E²PROM cells are scattered around thechip at different locations. These bits are then used to store keyswhich will be on different physical locations on the die. Since the keybits are not always the same, each processor would be different. Thismeans that the processor uses a variable instruction set, and differenthardware on each individual chip will be activated upon execution of theinstructions. If address mapping is scrambled in a variable way, eachchip executing this same logarithm will be activated in a different wayas a result of the hardware on the chip being activated in a differentway. Protecting a key is easier than protecting larger information sets.

There are two common situations which deserve some explanation:

1. The chip is in an embedded environment in which all instructions areunder one key, such as a smart card or set-top box for satellite TV. Atiny Card Operating System in this case would be coded for the key andwould be held on the chip.

2. The chip is in an open system such as a PC or workstation where anOperating System (OS) is not using a key.

The first situation is the easiest to deal with. This will be where theCPU 11 is dedicated to one embedded situation where it uses one key fora long time. It can have its key changed by re-programming E²PROM cells.Then it uses the new key for a long time.

The second situation can use a null key (all zeros) where the OS usesordinary op-codes for its work, and then the secret key bits are usedfor the variable instruction set for non-OS tasks. On-chip memory ispartitioned so there is a section which the OS cannot access because itis only used for programs running under the key. When implemented forthis scenario, the E²PROM cells holding the key bits are implemented asNon-Volatile RAM cells (NVRAM) where a default key bit is stored in theE²PROM cell section of the NVRAM cell, and a variable key bit may bewritten into the RAM section of the NVRAM cell. This RAM section may beall zeros, so it uses standard op-codes such as Java byte codes, or itcan be a volatile key so that the chip will use non-standardinstructions from a coded OS.

There can be two programs interleaved (or more than two if the addedexpense of IC real estate is provided to allow several keys to be readyfor use at any time). One program can use the default key in the NVRAMcells and then, with little delay, the key bit value in the RAM part ofthe NVRAM cells can become the controlling key bits.

When one key is in effect, the logic gates are allocated to form amicroprocessor under that key's command. When another key is put ineffect, the instruction decoder is re-programmed to respond to the otherinstruction set. For this purpose, where switching instruction setsoccurs frequently, the instruction decoder should be controlled byvolatile RAM cells so that the endurance is not limited by E²PROM cellendurance.

One configuration which may be useful in that scenario is the null-keyconfiguration, with which standard op-codes are used for standard OS orother purposes. No security is lost when switching to a null-key becausethe on-chip memory is partitioned to prevent the OS from reading memorylocations that are provided exclusively for the secret key. The codedsoftware under the key is not usable by the OS, so that does not need tobe protected. Off chip memory is not protected, and the program must bewritten to recognize this fact.

When the switch is made from one key to another key, the state of theprocessor is saved to secure on chip memory locations so that the statecan be restored when the first key again comes into effect.

The CPU 11 uses the programmable instruction decoder to decode encryptedinstruction op codes. The decoding is accomplished without decryptingthe op codes and logic gates immediately process data. The datarepresentation changes during the execution, which has the effect ofsecuring the program from analysis for decryption.

A custom instruction set is provided for each CPU chip 11 or groups ofCPU chips. That custom instruction set would be used by the softwaremanufacturer to send a unique version of a mass produced program to acustomer with a microprocessor chip. The CPU is therefore programmed forthat custom instruction set. The length of each instruction, and theother features of this invention should be configured to havecryptographically significant security when viewed from the IC pins.Pirates who examine signals inside the IC will be deterred from successby the encryption techniques. A secret key is used by the IC and by thecompiler 41 so that the instructions produced by the compiler 41 areonly executable by an IC which has the same key. The key is stored onthe IC in non-volatile memory and it controls the instruction decoder,reconfigurable logic, signal routing, error corrections to instructions,a sequencer circuit, and instruction buffer content interdependencychecking. The key also determines the program counter operations whichwould not be incremented in the usual manner. The key also controlsinstruction result obfuscation circuits so that common microprocessorresults, such as the ANDing of two operands, are not easily recognized.The key controls memory mapping in the IC so that physically fixedmemory resources are allocated in different ways for ICs with differentkeys.

Optionally, data may be used in various numeric representations which donot constitute encryption. These data representations would be ofvarieties which can be immediately evaluated by logic circuits. The dataresulting from program execution would be output from the IC in blockswhich are larger than usual block sizes so that adversaries would havemore difficulty in benefitting from knowledge of the data results. Datacoding is of secondary importance in this invention, while instructioncoding is of primary importance. The varying data numericrepresentations are not expected to provide much security from highlyskilled experts, but they are expected to prevent unskilled adversariesfrom understanding the data. This technique raises a barrier againstsome adversaries, without using data encryption. The compiler 41 will benotified, by means of the key distribution information, of the variabledata numeric representations so that it will compile instructions anddata which conform to the data representations which the IC is preparedto handle.

The way instructions are executed, an adversary attempting to pirate thesoftware will have difficulty understanding the results of instructionexecution needed to reconstruct the algorithm that the programimplements. It is a goal of this design to anticipate what pirates willtry, and to provide measures which will thwart those expected tactics.The microprocessor chip as used in this invention will haveinstructions, data, and addresses, as most computers do. The RAM forinstructions will also have bits in each instruction that causeconfusion for attackers, but which are ignored by the instructiondecoder.

In the past, secured embedded microcontrollers have usually usedstandard microprocessor architectures and have attached securityenhancing hardware around this core. In the inventive configuration, thearchitecture is designed with physical security in mind so that securityhardware features are deeply embedded in the architecture, instead ofaround the periphery of the architecture.

One example of this plan is the way memory is used. Each memory typeused on the invention (RAM, E²PROM, PROM, ROM, anti-fuse, fuse,laser-link) appears in several block sizes in the physical layout. Thereis 1 bit memory which is used in logic in a static way. There should behundreds of single bit memory blocks. There can be a 16 bit block ofmemory that is used to control reconfigurable logic. There can be largern bit arrays, as is normally seen on ICs. This tactic increases thecomplexity of the work that an adversary may attempt.

The execution of encrypted software is accomplished by modifyinginstruction sets in a CPU, thereby obviating the necessity fordecrypting encrypted software external of the CPU. As a result, there isno decrypted output of the software external of the CPU. By sufficientlyprotecting the CPU from analysis during its operation, an attacker isdenied access to a decrypted form of the software and is further deniedaccess to information with which to decrypt the software.

A physical design for the CPU 11 can be done with multiple layers ofmetal and with diffused conductors, so that e-beam analysis is moredifficult. Conductors used in executing the encrypted code would beformed in this manner. As is well known to people who practice the artof IC voltage-contrast imaging, it is usually necessary to have astockpile of many ICs to etch back, cut apart, and to probe so that ICsthat are destroyed can be thrown away and be replaced by an identicalIC. If each IC has uniquely programmed instruction sets, uniquelyprogrammed address decoders, and uniquely programmed obfuscatorcircuits, then the pirate only gets one chance with one IC. If thepirate destroys one IC, she cannot get an identical IC to continue herwork. She would have to start over again. Multiple layers of metal canbe used to cover up lower levels of metal. In addition, p or n typesilicon diffused conductors can be used to hide signals below higherlevels of interconnect.

It is further possible to implement the invention with a coprocessor ina system with an ordinary CPU. The output of the inventive CPU is thenprovided to the user's computer. In one variation of the invention, theinventive CPU would be provided with multiple keys, including a fixedkey, and keys which are changed at different periodic rates, such asyearly, monthly and at lesser time periods. While providing individualkeys for individual CPUs, the ability of an adversary attempting todecrypt the software is limited to the ability to use that particularprogram on the particular CPU, without an ability to use the encryptedprogram on a different CPU.

It should be understood that various modifications within the scope ofthe invention can be made by one of ordinary skill in the art withoutdeparting from the spirit thereof, therefore it is intended that theinvention be defined by the scope of the appended claims as broadly asthe prior art will permit, and in view of the specification if need be.

What is claimed is:
 1. A processor for processing securely executablecomputer programs adapted for execution exclusively on processorsspecifically adapted for the security of said computer programs,comprising: an instruction buffer for receiving code portions includingregister bits comprising instructions from a securely executablecomputer program, said instruction buffer including a predeterminedplurality of bit locations in a predetermined format; and logiccircuitry including a programmable instruction decoder enablinginterpretation of instructions stored in said instruction bufferaccording to the predetermined format at said plurality of bitlocations, said logic circuitry configured to route said register bitsto subsequent bit locations according to a predetermined interdependencycriterion.
 2. The processor of claim 1, further comprising: a store fora key shared with a compiler, the key used by the compiler to encryptstandard instructions into encrypted instructions; and the routing ofthe register bits controlled in accordance with the key.
 3. Theprocessor of claim 1, wherein: the plurality of bit locations areprovided in a block which is larger than required for standardinstructions, thereby providing an excess of register bits; and thelogic circuitry providing the verification by checking bits within saidexcess of register bits.
 4. The processor of claim 1, furthercomprising: program instructions provided in a pipeline architecture;and an information key established as instruction security commands at aplurality of steps in said pipeline architecture, wherein an arithmeticlogic unit (ALU) provides variability of logic circuits for execution ofencrypted op codes or standard op codes that provide standardinstruction operation types.
 5. The processor of claim 4, furthercomprising: the key stored in more than one memory cell type including aRead Only Memory (ROM), an Electrically Erasable Programmable Read OnlyMemory (E²PROM), and a Random Access Memory (RAM); the keys includingbits expandable into a larger set of bits which control the instructiondecoder, signal routing, and logic circuit reconfiguration; a serialnumber in ROM which participates in the allocation of logic circuits androuting of signals, and communicated to the compiler to inform thecompiler of custom allocation and routing; and the key providing acapability of controlling signal routing, and logic circuitreconfiguration whether the instructions are encrypted instructions orstandard instructions.
 6. The processor of claim 5, wherein: a pluralityof reconfigurable logic circuits have a capability of calculatingresults of execution of an instruction; said plurality of the logiccircuits include provisions for accepting correct data operands andplausible wrong data operands; and said plurality of the logic circuitsinclude provisions for outputting correct results along with plausiblewrong results.
 7. The processor of claim 6, wherein the output registerfor data results have a capability of containing both correct resultsand plausible wrong results which are in word locations in the outputregister, the locations of the results coordinated by the key.
 8. Theprocessor of claim 7, further comprising: a plurality of the memorylocations dispersed within a layout; a plurality of reconfigurable logiccircuits able to calculate results of execution of an instruction; saidplurality of the logic circuits including provisions for acceptingcorrect data operands and plausible wrong data operands; and saidplurality of the logic circuits including provisions for outputtingcorrect results along with plausible wrong results.
 9. The processor ofclaim 8, further comprising: the key providing a capability ofre-allocating memory resources and register resources; a serial numberin ROM which participates in the allocation of logic circuits androuting of signals; and the serial number used in combination with thekey in providing said capability.
 10. The processor of claim 1, wherein:the subsequent bit locations must conform to a predeterminedinterdependency criteria corresponding to said predetermined formatsubsequent to execution of at least one instruction by the logiccircuitry; and the logic circuitry provides a verification of theinterdependency criteria.
 11. The processor of claim 1, furthercomprising: reconfigurable logic circuits calculating the results of theexecution of an instruction; said portion of the logic circuitsincluding provisions for accepting correct data operands and plausiblewrong data operands; and said portion of the logic circuits includingprovisions for outputting correct results along with plausible wrongresults.
 12. The processor of claim 10, further comprising: a store fora key shared with a compiler, the key used by the compiler to encryptstandard instructions into encrypted instructions; the key stored inmore than one memory cell type including a Read Only Memory (ROM), anElectrically Erasable Programmable Read Only Memory (E²PROM), and aRandom Access Memory (RAM); the key including bits expandable into alarger set of bits which control the instruction decoder, signalrouting, and logic circuit reconfiguration; a serial number in ROM whichparticipates in the allocation of logic circuits and routing of signals,and communicated to the compiler to inform the compiler of customallocation and routing; and the key providing a capability ofcontrolling signal routing, and logic circuit reconfiguration whetherthe instructions are encrypted instructions or standard instructions.13. The processor of claim 1, wherein a choice is provided of usingencrypted instructions or standard instructions.
 14. The processor ofclaim 1, further comprising: program instructions provided in a pipelinearchitecture; and information keys established as instruction securitycommands at a plurality of steps in said pipeline architecture, whereinan arithmetic logic unit (ALU) provides variability of logic circuitsfor execution of encrypted op codes or standard op codes that providestandard instruction operation types.
 15. The processor of claim 1,wherein: said routing causes an output of correct results along withplausible wrong results; and the correct results are provided in wordlocations in the output register coordinated by the key.
 16. Theprocessor of claim 1, further comprising: a store for a key shared witha compiler, the key used by the compiler to encrypt standardinstructions into encrypted instructions; and data and instructionsprovided to a computer via program information includes an intentionalintroduction of errors correctable with error correction algorithms,said correction algorithms pre-selected according to the key.
 17. Amicroprocessor for processing computer programs which are selectivelyoperable on selected ones of individual microprocessors, comprising: astore for a key shared with a compiler, the key used by the compiler toencrypt standard instructions into encrypted instructions; and aninstruction buffer which contains logic able to route a subset ofregister bits from any bit locations in the buffer to destination logiccircuits which reach a programmable instruction decoder, the routing ofthe register bits controlled in accordance with the key.
 18. Themicroprocessor of claim 17, further comprising: program instructionsprovided in a pipeline architecture; and an information key establishedas instruction security commands at a plurality of steps in saidpipeline architecture, wherein an arithmetic logic unit (ALU) providesvariability of logic circuits for execution of encrypted op codes orstandard op codes that provide standard instruction operation types. 19.The microprocessor of claim 17, further comprising: the key stored inmore than one memory cell type including a Read Only Memory (ROM), anElectrically Erasable Programmable Read Only Memory (E²PROM), and aRandom Access Memory (RAM); the keys including bits expandable into alarger set of bits which control the instruction decoder, signalrouting, and logic circuit reconfiguration; a serial number in ROM whichparticipates in the allocation of logic circuits and routing of signals,and communicated to the compiler to inform the compiler of customallocation and routing; and the key providing a capability ofcontrolling signal routing, and logic circuit reconfiguration whetherthe instructions are encrypted instructions or standard instructions.20. The microprocessor of claim 19, further comprising an outputregister for data results able to contain both correct results andplausible wrong results which are in word locations in the outputregister coordinated by the key.
 21. The microprocessor of claim 20,further comprising: a plurality of reconfigurable logic circuits able tocalculate results of execution of an instruction; said plurality of thelogic circuits including provisions for accepting correct data operandsand plausible wrong data operands; and said plurality of the logiccircuits including provisions for outputting correct results along withplausible wrong results.
 22. The microprocessor of claim 20, furthercomprising: a plurality of the memory locations dispersed within alayout; a plurality of reconfigurable logic circuits able to calculateresults of execution of an instruction; said plurality of the logiccircuits including provisions for accepting correct data operands andplausible wrong data operands; and said plurality of the logic circuitsincluding provisions for outputting correct results along with plausiblewrong results.
 23. The microprocessor of claim 17, further comprising:the key providing a capability of re-allocating memory resources andregister resources; a serial number in ROM which participates in theallocation of logic circuits and routing of signals; and the serialnumber used in combination with the key in providing said capability.24. The microprocessor of claim 17, wherein a choice is provided ofusing encrypted instructions or standard instructions.
 25. Themicroprocessor of claim 17, wherein the instruction bufferinterdependency checking logic includes any combination of thefollowing: multiplexers to select a subset of bits from each longinstruction word in the instruction buffer to be logically combined tomatch a sequencer value; a sequencer incremented at times determined bya key and which is reset upon the occurrence of the sequencer reset codein the instruction buffer; distribution of bits for one encrypted opcode across several long instruction words in the instruction buffer;distribution of several encrypted op codes around the long instructionwords in the instruction buffer; a program counter which does notnormally increment by one, but which increments by some other constantor variable amount determined by the serial number, the key, and thesequencer value so that encrypted op codes which will be usedsequentially in time do not occur sequentially in the instructionbuffer, and for which, the time sequential chosen op codes are selectedby the multiplexer controlled by the key, the serial number, and thesequencer; error correction circuits controlled by the key, sequencer,and supplementary error correcting codes received from the instructionbuffer by means of the multiplexers; and dependency validation codesreceived through the multiplexer of the instruction buffer checked bylogic circuits that depend on the key, the serial number, instructionbits, and camouflage bits.
 26. The microprocessor of claim 25, whereindependency validation codes are received through the multiplexer of theinstruction buffer checked by logic circuits that depend on the key, theserial number, instruction bits and camouflage bits so that incorrectvalidation bits provide an alarm.
 27. The microprocessor of claim 26,further comprising: a plurality of storage locations for keys, with thekeys further determining storage locations of satellite keys andsatellite access flags, said locations intentionally varied;key-dependent storage of remote access approval flags, the remote accessapproval flags encoded so as to obscure the locations of said approvalflags; the logic circuitry able to use a null key for a defaultunencrypted instruction set with partitioning of memory resourcesbetween those used for with null key programs and those used for thekeyed programs; and the logic circuitry able to select from any ofseveral stored keys so that several independent encrypted andunencrypted programs may be executed sequentially by installing eachdifferent key when needed, which also reallocates memory and registerresources that are securely partitioned from each other.
 28. Themicroprocessor of claim 27, further comprising: logic for requiringnetwork handshaking, the network handshaking further used to provideadditional key information for continued operation.
 29. Method ofprocessing computer programs on a selected one of individualmicroprocessors, the method comprising: buffering a first set ofinstructions as register bits; providing an excess of register bits;executing the instructions; buffering further instructions as registerbits; and providing a verification of said first set of instructions andsaid further instructions conforming to a predetermined criteria. 30.The method of claim 29, further comprising: using a plurality of thereconfigured logic circuits to calculate results of execution of aninstruction; accepting correct data operands and plausible wrong dataoperands with said plurality of the logic circuits; and outputtingcorrect results along with plausible wrong results from said pluralityof the logic circuits.
 31. A microprocessor for processing computerprograms selectively operable on selected ones of individualmicroprocessors, comprising: at least one memory location for receivinglogic instructions for executing encrypted program instruction; logiccircuitry for modifying operation in accordance with logic instructionsstored in said memory location; and logic circuitry configurable inaccordance with the received logic instructions.